/**
 * Created by zhang on 4/27/2017.
 */
var path = require('path');

var cache = {}

/**
 * normalize path, in windows is '\', in Linux is '/'
 */
function store(key, value) {
    cache[path.normalize(key)] = value;
}

store(path.join('c:', 'Program file', 'jetbrains', 'webstorm 2017.1.1', 'bin', 'webstorm64.exe'), 2); // join path and normalize
store('C:\\Users\\zhang\\Desktop\\web.exe', 1);

for (x in cache){
    console.log("key is " + x + " | value is " + cache[x] + " | file extName is " + path.extname(x));
}
